// import variables from '@/styles/variables.module.scss'
// import { MAIN_COLOR } from '@/constant'
// import { getItem } from '@/utils/storage'
const getters = {
  token: state => state.user.token,
  userInfo: state => state.user.userInfo,
  /**
   * @returns true 表示已存在用户信息
   */
  hasUserInfo: state => {
    return JSON.stringify(state.user.userInfo) !== '{}'
  },
  // 样式变量
  cssVar: state => {
    return {
      ...state.theme.variables
    }
  },

  sidebarOpened: state => state.app.sidebarOpened,
  // 国际化处理
  language: (state) => state.app.language,
  // 主题色
  mainColor: state => state.theme.mainColor,
  tagsViewList: (state) => state.app.tagsViewList
}
export default getters
